@import "../../index.less";

.ztree * {
  padding: 0;
  margin: 0;
}

.ztree {
  margin: 0;
  padding: 5px;
}

.ztree li {
  padding: 0;
  margin: 0;
  list-style: none;
  line-height: 14px;
  text-align: left;
  white-space: pre;
  outline: 0
}

.ztree li ul {
  margin: 0;
  padding: 0 0 0 18px
}

.ztree.solid li ul {
  margin: 0;
  padding: 0 0 0 24px
}

// 此处不用2倍图，改用css画虚线
// z-tree的line是一整块子节点区域，所以不能使用background-size: contain
// 使用1倍图太模糊，这边就使用css自己画了，calc属性支持IE9, IE8反正会走hack, 不影响
.ztree li ul.line {
  position: relative;
  &:before {
    position: absolute;
    content: '';
    border-left: 1px dashed @border-color-dark-gray-line;
    height: calc(~"100% - 3px");
    left: 11px;
    margin-top: 1px;
  }
}

.ztree.solid li ul.line {
  &:before {
    border-left: 1px solid @border-color-dark-gray-line;
    height: 100%;
    left: 15px;
    margin-top: 0;
  }
}

.bi-theme-dark {
  .ztree li ul.line {
    &:before {
      border-left: 1px dashed @border-color-dark-gray-line;
    }
  }
  .ztree.solid li ul.line {
    &:before {
      border-left: 1px solid @border-color-dark-gray-line-theme-dark;
    }
  }
}

.ztree li a {
  padding: 1px 3px 0 0;
  margin: 0;
  cursor: pointer;
  height: 23px;
  background-color: transparent;
  text-decoration: none;
  vertical-align: top;
  display: inline-block;
  .tree-node-text {
    &:not(.disabled) {
      &:hover {
        .background-color(@color-bi-background-highlight, 10%);
      }
      &:active {
        color: @color-bi-text-highlight;
        .background-color(@color-bi-background-highlight, 15%);
      }
    }
  }
}

.ztree.solid li a {
  height: 31px;
}

.ztree li a.curSelectedNode {
}

.ztree li a.curSelectedNode_Edit {
  padding-top: 0px;
  background-color: #FFE6B0;
  color: black;
  height: 16px;
  border: 1px #FFB951 solid;
  opacity: 0.8;
}

.ztree li a.tmpTargetNode_inner {
  padding-top: 0px;
  background-color: #316AC5;
  color: white;
  height: 16px;
  border: 1px #316AC5 solid;
  opacity: 0.8;
  filter: alpha(opacity=80)
}

.ztree li a.tmpTargetNode_prev {
}

.ztree li a.tmpTargetNode_next {
}

.ztree li a input.rename {
  height: 14px;
  width: 80px;
  padding: 0;
  margin: 0;
  font-size: 12px;
  border: 1px #7EC4CC solid;
  *border: 0px
}

.ztree li span {
  line-height: 24px;
  margin-right: 2px;
  // fix: 标红字符与正常字符存在间距
  &.bi-keyword-red-mark {
    margin-right: 0px;
  }
}

.ztree.solid li span {
  line-height: 32px;
}

.ztree li span.button {
  line-height: 0;
  margin: 0;
  width: 16px;
  height: 16px;
  display: inline-block;
  vertical-align: middle;
  border: 0 none;
  cursor: pointer;
  outline: none;
  background-color: transparent;
  background-repeat: no-repeat;
  background-attachment: scroll;
}

.ztree li span.button.chk {
  &.bi-checkbox {
    border: 1px solid @color-bi-border-dark-line;
    box-sizing: border-box;
    &.active {
      background-color: @color-bi-background-highlight;
      border-color: @color-bi-border-highlight;
    }
    &.disabled {
      border: 1px solid @color-bi-border-disabled;
      background-color: @color-bi-background-disabled;
      &.active {
        border-color: @color-bi-border-disabled;
      }
    }
  }
  &.bi-half-button {
    border: 1px solid @color-bi-border-highlight;
    box-sizing: border-box;
  }
}


.ztree li span.button.chk {
  position: relative;
  width: 14px;
  height: 14px;
  margin: 0 3px 0 0;
  cursor: auto
}

.ztree li span.button.chk.checkbox_false_disable {
  background-position: 0 -56px
}

.ztree li span.button.chk.checkbox_true_disable {
  background-position: -14px -56px
}

.ztree li span.button.chk.radio_false_full {
  background-position: -28px 0
}

.ztree li span.button.chk.radio_false_full_focus {
  background-position: -28px -14px
}

.ztree li span.button.chk.radio_false_part {
  background-position: -28px -28px
}

.ztree li span.button.chk.radio_false_part_focus {
  background-position: -28px -42px
}

.ztree li span.button.chk.radio_false_disable {
  background-position: -28px -56px
}

.ztree li span.button.chk.radio_true_full {
  background-position: -42px 0
}

.ztree li span.button.chk.radio_true_full_focus {
  background-position: -42px -14px;
}

.ztree li span.button.chk.radio_true_part {
  background-position: -42px -28px
}

.ztree li span.button.chk.radio_true_part_focus {
  background-position: -42px -42px
}

.ztree li span.button.chk.checkbox_true_full {
  & + a {
    color: @color-bi-text-highlight;
  }
}

.ztree li span.button.chk.checkbox_true_full_focus {
  & + a {
    color: @color-bi-text-highlight;
  }
}

.ztree li span.button.chk.checkbox_true_part {
  & + a {
    color: @color-bi-text-highlight;
  }
}

.ztree li span.button.chk.checkbox_true_part_focus {
  & + a {
    color: @color-bi-text-highlight;
  }
}

.ztree li span.button.chk.radio_true_disable {
  background-position: -42px -56px
}

.ztree li span.button.switch {
  width: 24px;
  height: 24px
}

.ztree.solid li span.button.switch {
  width: 32px;
  height: 32px
}

.ztree li span.button.switch.noline_open {
  width: 0;
}

.ztree li span.button.switch.noline_close {
  width: 0;
}

.ztree li span.button.noline_open {
  background-position: -92px -72px
}

.ztree li span.button.noline_close {
  background-position: -74px -72px
}

.ztree li span.button.root_docu {
  background: none;
}

.ztree li span.button.noline_docu {
  background: none;
  width: 0;
}

.ztree li span.button.ico_open {
  margin-right: 2px;
  background-position: -110px -16px;
  vertical-align: top;
  *vertical-align: middle
}

.ztree li span.button.ico_close {
  margin-right: 2px;
  background-position: -110px 0;
  vertical-align: top;
  *vertical-align: middle
}

.ztree li span.button.ico_docu {
  margin-right: 2px;
  background-position: -110px -32px;
  vertical-align: top;
  *vertical-align: middle
}

.ztree li span.button.edit {
  margin-right: 2px;
  background-position: -110px -48px;
  vertical-align: top;
  *vertical-align: middle
}

.ztree li span.button.remove {
  margin-right: 2px;
  background-position: -110px -64px;
  vertical-align: top;
  *vertical-align: middle
}

.ztree li span.button.ico_loading {
  width: 0px;
  margin-right: 2px;
  vertical-align: top;
  *vertical-align: middle
}

ul.tmpTargetzTree {
  background-color: #FFE6B0;
  opacity: 0.8;
  filter: alpha(opacity=80)
}

span.tmpzTreeMove_arrow {
  width: 16px;
  height: 16px;
  display: inline-block;
  padding: 0;
  margin: 2px 0 0 1px;
  border: 0 none;
  position: absolute;
  background-color: transparent;
  background-repeat: no-repeat;
  background-attachment: scroll;
  background-position: -110px -80px;
}

ul.ztree.zTreeDragUL {
  margin: 0;
  padding: 0;
  position: absolute;
  width: auto;
  height: auto;
  overflow: hidden;
  background-color: #cfcfcf;
  border: 1px #00B83F dotted;
  opacity: 0.8;
  filter: alpha(opacity=80)
}

.zTreeMask {
  z-index: 10000;
  background-color: #cfcfcf;
  opacity: 0.0;
  filter: alpha(opacity=0);
  position: absolute
}

/* level style*/
/*.ztree li span.button.level0 {
	display:none;
}
.ztree li ul.level0 {
	padding:0;
	background:none;
}*/
